home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Development / Source / Chess++ ƒ / CChessInfoPane.cp < prev    next >
Text File  |  1993-05-26  |  2KB  |  55 lines

  1. ////////////
  2. //
  3. //    CChessInfoPane.cp
  4. //
  5. //    The ChessInfoPane Class
  6. //
  7. //    SUPERCLASS = CPane
  8. //    Copyright © 1993 Steven J. Bushell. All rights reserved.
  9. //
  10. ////////////
  11.  
  12. #include "CChessInfoPane.h"
  13. #include "CChessOptionsDialog.h"
  14.  
  15. void    CChessInfoPane::Draw(Rect *area)
  16. {
  17.     Str255    easyGameInfoString = "\pOn this setting, the computer takes about 5 to 30 seconds per move.",
  18.             hardGameInfoString = "\pOn this setting, the computer takes about 1 to 6 minutes per move.",
  19.             wayHardGameInfoString = "\pOn this setting, the computer takes about 10 to 60 minutes per move.",
  20.             soundOnBetterMovesString = "\pWith this box checked, the program will beep every time it finds a better move.",
  21.             showThoughtsString = "\pWith this box checked, the program will highlight the piece it is analyzing.",
  22.             doReallyCoolThingsString = "\pWith this box checked, a back-propagated analysis of all moves will be stored in an internal library.";
  23.     Rect    aRect;
  24.     
  25.     aRect.top = aRect.left = 0;
  26.     aRect.right = width;
  27.     aRect.bottom = height;
  28.  
  29.     FrameRect(&aRect);
  30.     InsetRect(&aRect,1,1);
  31.  
  32.     switch (infoString) {
  33.         case kEasyGame:
  34.             TextBox(&easyGameInfoString[1],easyGameInfoString[0],&aRect,1);
  35.             break;
  36.         case kHardGame:
  37.             TextBox(&hardGameInfoString[1],hardGameInfoString[0],&aRect,1);
  38.             break;
  39.         case kWayHardGame:
  40.             TextBox(&wayHardGameInfoString[1],wayHardGameInfoString[0],&aRect,1);
  41.             break;
  42.         case kSoundOnBetterMoves:
  43.             TextBox(&soundOnBetterMovesString[1],soundOnBetterMovesString[0],&aRect,1);
  44.             break;
  45.         case kShowThoughts:
  46.             TextBox(&showThoughtsString[1],showThoughtsString[0],&aRect,1);
  47.             break;
  48.         case kDoReallyCoolThings:
  49.             TextBox(&doReallyCoolThingsString[1],doReallyCoolThingsString[0],&aRect,1);
  50.             break;
  51.         default:
  52.             EraseRect(&aRect);
  53.             break;
  54.     }        
  55. }